import config from './config'
export default function({url,method='get',data,}){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: config.baseUrl + url,
      method,
      data,
      header:{
        cookie:'MUSIC_U=dfd2ade77aa0315d73fe7a9b7fc179b16c87265fc8b859261206bb5782b1c1211e8907c67206e1ed332a7abfee2a69cf537bf60a356b06d42e1f664e1d5eb40d741c68591d47e35ad4dbf082a8813684'
      },
      success:res=> {
        resolve(res.data)
      },
      fail:error=>{
        reject(error)
      }
    })
  })
}